/**************************************************************************************
*
*	Copyright (C) 2009 - 2012 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	EventWindowing.h
*
*	Description -	Any events related to the Windowing System. 
*
*	Comments	-
*
*	Modification History:
*			Name			   Date					Description
*			MrCodeSushi	-	05/07/2013	-	Creation of this file
**************************************************************************************/

#ifndef _PSX_EVENT_WINDOWING_H_
#define _PSX_EVENT_WINDOWING_H_

#include "PulseSTD.h"
#include "IEvent.h"

namespace Pulse
{
	struct BaseWindowingEvent : public IEvent
	{
	public:

		virtual const EEvent::Type GetEventType( void ) const = 0;

		Window * GetWindow( void ) { return m_pWindow; }

		const INT GetMessage1( void ) const { return m_msg1; }

		const INT GetMessage2( void ) const { return m_msg2; }

	protected:

		BaseWindowingEvent( Window *pWindow, INT msg1 = 0, INT msg2 = 0 )
			: m_pWindow( pWindow ), m_msg1(msg1), m_msg2(msg2)
		{
		}


		Window	*m_pWindow;
		INT		m_msg1;	// Can be anything depending on the event type
		INT		m_msg2; // Can be anything depending on the event type
	};

	// msg1 : Windows Handle (hWnd)
	class EventWindowGainFocus: public BaseWindowingEvent
	{
	public:

		EventWindowGainFocus( Window *pWindow, INT msg1 = 0, INT msg2 = 0 )
			: BaseWindowingEvent( pWindow, msg1, msg2 )
		{
		}

		virtual const EEvent::Type GetEventType( void ) const { return EEvent::WINDOW_GAIN_FOCUS; }
	};

	// msg1 : Windows Handle (hWnd)
	class EventWindowLoseFocus: public BaseWindowingEvent
	{
	public:

		EventWindowLoseFocus( Window *pWindow, INT msg1 = 0, INT msg2 = 0 )
			: BaseWindowingEvent( pWindow, msg1, msg2 )
		{
		}

		virtual const EEvent::Type GetEventType( void ) const { return EEvent::WINDOW_LOSE_FOCUS; }
	};
}

#endif /* _PSX_EVENT_WINDOWING_H_ */